import java.util.Arrays;

public class Test13 {
    public static void main(String[] args) {
        int[] arr = {2,3,1,4,6,8,7,9,0,5};
        int[] arr_ji = new int[5];
        int[] arr_ou = new int[5];
        int index_ji = 0;
        int index_ou = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]%2==0){
                arr_ou[index_ou] = arr[i];
                index_ou++;
            }else{
                arr_ji[index_ji] = arr[i];
                index_ji++;
            }
        }
        Arrays.sort(arr_ji);
        Arrays.sort(arr_ou);
        System.out.println("奇数数组：");
        for (int i = 0; i < arr_ji.length; i++) {
            System.out.print(arr_ji[i]+" ");
        }
        System.out.println();
        System.out.println("偶数数组：");
        for (int i = 0; i < arr_ou.length; i++) {
            System.out.print(arr_ou[i]+" ");
        }
    }
}
